Issue 1698: Use safe_sleep executable in bash scripts#1707
Merged
fhammerl merged 4 commits intoactions:mainfrom Mar 1, 2022
ruvceskistefan:stefan-ruvceski/feature/1698
Merged
Issue 1698: Use safe_sleep executable in bash scripts#1707fhammerl merged 4 commits intoactions:mainfrom ruvceskistefan:stefan-ruvceski/feature/1698
fhammerl merged 4 commits intoactions:mainfrom
ruvceskistefan:stefan-ruvceski/feature/1698
Conversation
fhammerl
reviewed
Feb 22, 2022
| elif [[ $returnCode == 2 ]]; then | ||
| echo "Runner listener exit with retryable error, re-launch runner in 5 seconds." | ||
| safe_sleep | ||
| ./bin/safe_sleep.sh 5 |
Contributor
There was a problem hiding this comment.
I'm always a bit iffy on relative paths, does is work fine if I start run.sh with an absolute path from a different directory?
Contributor
Author
There was a problem hiding this comment.
I changed to absolute paths and changed the location of the safe_sleep script, so it is not in bin folder.
This was referenced Mar 1, 2022
Closed
|
How this got merged? This is definitely endless loop. runner/src/Misc/layoutroot/safe_sleep.sh Lines 3 to 6 in 0ebdf9e EDIT. Oh, SECONDS is autoincremented by bash. didn't know that. |
|
Why is this not attempting to yield using a potentially available sleep call on the systems where that is available. Ie close to all systems. Could just do that inside the new loop. Busy waiting is always really bad. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problems were:
sleepin the case when both ping and sleep are missing insafe_sleepfunctionsleepfunction instead ofsafe_sleepin bash scriptRelated issue: #1698
After this change,
safe_sleepis implemented as separate executable bash script, and scriptsrun-helper.shandupdate.share using that function instead of standardsleepfunction.